package com.hongyi.utils.dateutils;

import org.apache.commons.lang3.time.DateUtils;

import java.util.Date;

/**
 * @Author: hongyi
 * @CreateTime: 2024-10-21
 */


public class DateUtils01 {
    public static void main(String[] args) {
        // 获取当天时间
        Date now = new Date();

        // 获取昨天时间
       /* Date yesterday = DateUtils.addDays(now, -1);
        System.out.println("Yesterday's date: " + yesterday);*/
        // 增加天数
        Date tomorrow = DateUtils.addDays(now, 1);
        System.out.println("Tomorrow's date: " + tomorrow);
    }
}
